extends "../cTDW/cTDW.gd"
func _info():
	pass

func _connect():
	._connect()

func _extInit():
	._extInit()
	chaName = "剑士"
	lv = 2
	attCoe.atkRan = 1
	attCoe.atk = 37 / 8.5 * 2 / 2
	attCoe.maxHp = 680 / 112.5 / 2
	attAdd.spd += 0.2
	addCdSkill("js",3)
	addSkillTxt("剑术精通：[主动]对当前敌人连续造成3次普攻[cd:3秒][被动]第三次普攻必定暴击；攻速+20%")

var norcnt:int = 0
func _onBattleStart():
	._onBattleStart()
	norcnt = 0

func _onAtkInfo(atkinfo):
	if atkinfo.atkType == Chara.AtkType.NORMAL && !atkinfo.isMiss && atkinfo.hitCha != self && atkinfo.atkCha == self:
		norcnt += 1
		if norcnt % 3 == 0:
			atkinfo.isCri = true
	._onAtkInfo(atkinfo)

func _castCdSkill(id):
	._castCdSkill(id)
	if id == "js" && aiCha:
		cst("剑法精通","000000",position)
		for i in range(3):
			if aiCha:
				hurtChara(aiCha,att.atk,Chara.HurtType.PHY,Chara.AtkType.NORMAL)